/*
 * ReferenceTable.c
 *
 *  Created on: 2011-7-7
 *      Author: gexiao
 */

/*
 * Reference table management.
 */
#include "Dalvik.h"

/*
 * Initialize a ReferenceTable structure.
 */
bool dvmInitReferenceTable(ReferenceTable* pRef, int initialCount,
		int maxCount) {
	pRef->table = (Object**) malloc(initialCount * sizeof(Object*));
	if (pRef->table == NULL)
		return false;
	pRef->nextEntry = pRef->table;
	pRef->allocEntries = initialCount;
	pRef->maxEntries = maxCount;
	return true;
}

/*
 *
 */
void dvmClearReferenceTable(ReferenceTable* pRef) {

}

/*
 * Add "obj" to "pRef".
 */
bool dvmAddToReferenceTable(ReferenceTable* pRef, Object* obj) {

}
